import 'package:json_annotation/json_annotation.dart';
import 'package:lovify/models/enums/schedule_status.dart';
import 'base_entity.dart';

part 'schedule.g.dart';

@JsonSerializable(explicitToJson: true)
class Schedule extends BaseEntity {
  final String? userId;
  final String? title;
  final String? description;
  final DateTime? startTime;
  final DateTime? endTime;
  final ScheduleStatus? status;

  Schedule({
    super.id,
    super.created,
    super.updated,
    super.deleted,
    this.userId,
    this.title,
    this.description,
    this.startTime,
    this.endTime,
    this.status,
  });

  factory Schedule.fromJson(Map<String, dynamic> json) =>
      _$ScheduleFromJson(json);

  @override
  Map<String, dynamic> toJson() => _$ScheduleToJson(this);
}
